<?php
$AnnouncementReport = Dracosys::getSessionValue(SESSION_INTERFACE, 'AnnouncementReport');
$AnnouncementTypeReport = Dracosys::getSessionValue(SESSION_INTERFACE, 'AnnouncementTypeReport');
?>
<h2>Relat&oacute;rio Comunicado ao Cliente</h2>
<section id="AnnouncementReport">
    <table id="AnnouncementReport_ReportMoreAnnouncement" class="Report">
        <thead>
            <tr>
                <th colspan=52">Mais Comunicados</th>
            </tr>
            <tr class="header">
                <td width="50%">Cliente</td>
                <td>N&ordm; Avaliações</td>
                <td>Elogios</td>
                <td>Erros</td>
                <td>Sugestões</td>
            </tr>
        </thead>
        <tbody>
            <?php foreach($AnnouncementReport as $Line): ?>
                <tr>
                    <td><?=$Line['Customer']->getCustomerName()?></td>
                    <td><?=$Line['Announcement']['TOTAL']?></td>
                    <td><?=$Line['Announcement']['ELOGIO']?></td>
                    <td><?=$Line['Announcement']['ERRO']?></td>
                    <td><?=$Line['Announcement']['SUGESTAO']?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

    <table id="AnnouncementReport_ReportMoreCompliment" class="Report hide">
        <thead>
            <tr>
                <th colspan="3">Mais Elogios</th>
            </tr>
            <tr class="header">
                <td width="50%">Cliente</td>
                <td>Total de Comunicados</td>
                <td>N&ordm; Elogios</td>
            </tr>
        </thead>
        <tbody>
            <?php foreach($AnnouncementTypeReport['ELOGIO'] as $Line): ?>
                <tr>
                    <td><?=$Line['Customer']->getCustomerName()?></td>
                    <td><?=$Line['NumberOfAnnouncement']['TOTAL']?></td>
                    <td><?=$Line['AnnouncementTypeNumber']?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

    <table id="AnnouncementReport_ReportMoreBug" class="Report hide">
        <thead>
            <tr>
                <th colspan="3">Mais Erros</th>
            </tr>
            <tr class="header">
                <td width="50%">Cliente</td>
                <td>Total de Comunicados</td>
                <td>N&ordm; Erros</td>
            </tr>
        </thead>
        <tbody>
            <?php foreach($AnnouncementTypeReport['ERRO'] as $Line): ?>
                <tr>
                    <td><?=$Line['Customer']->getCustomerName()?></td>
                    <td><?=$Line['NumberOfAnnouncement']['TOTAL']?></td>
                    <td><?=$Line['AnnouncementTypeNumber']?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

    <table id="AnnouncementReport_ReportMoreSuggestion" class="Report hide">
        <thead>
            <tr>
                <th colspan="3">Mais Sugestões</th>
            </tr>
            <tr class="header">
                <td width="50%">Cliente</td>
                <td>Total de Comunicados</td>
                <td>N&ordm; Sugestões</td>
            </tr>
        </thead>
        <tbody>
            <?php foreach($AnnouncementTypeReport['SUGESTAO'] as $Line): ?>
                <tr>
                    <td><?=$Line['Customer']->getCustomerName()?></td>
                    <td><?=$Line['NumberOfAnnouncement']['TOTAL']?></td>
                    <td><?=$Line['AnnouncementTypeNumber']?></td>
                </tr>
            <?php endforeach; ?>
        </tbody>
    </table>

    <div class="pagination">
        <a href="#" rel="ReportMoreAnnouncement" class="selected borderRadios">Mais Comunicados</a>
        <a href="#" rel="ReportMoreCompliment" class="nonselected borderRadios">Mais Elogios</a>
        <a href="#" rel="ReportMoreBug" class="nonselected borderRadios">Mais Erros</a>
        <a href="#" rel="ReportMoreSuggestion" class="nonselected borderRadios">Mais Sugestões</a>
    </div>

</section>